#!/bin/bash
read -p "请输入要创建的用户：" user
read -p "要创建的个数：" num
count=0
echo "正在创建中》》》》"
if while [ $count -lt $num ]
do
let count+=1
useradd ${user}$count
echo ${user}$count | passwd --stdin ${user}$count > /dev/null
done;then
echo "$num个$user用户已创建成功！！！"
fi

